home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / STRCPY.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  335 b   |  15 lines

  1. /* strcpy.c  From TC Bible page 280  Use stpcpy to copy one string to
  2. another.  It returns a pointer to the end of the string. */
  3.  
  4. #include <stdio.h>
  5. #include <string.h>
  6. main()
  7. {
  8.     char str1[80], str2[80];
  9.     printf("Enter a string: ");
  10.     gets(str2);
  11.     strcpy(str1,str2);
  12.     printf("String copied.  Result is: %s\n", str1);
  13. }
  14.  
  15.